import { request } from '@/service/request';

/** 获取微信支付配置列表 */
export function fetchGetCustomerServiceList(params?: Api.Business.CustomerServiceSearchParams) {
  return request<Api.Business.CustomerServiceList>({
    url: '/customer_service_config/getAll',
    method: 'post',
    data: params
  });
}

/** 新增微信支付配置 */
export function fetchCreateCustomerService(data: Api.Business.CustomerServiceOperateParams) {
  return request<boolean>({
    url: '/customer_service_config/add',
    method: 'post',
    headers: {
      isEncrypt: true,
      repeatSubmit: false
    },
    data
  });
}

/** 修改微信支付配置 */
export function fetchUpdateCustomerService(data: Api.Business.CustomerServiceOperateParams) {
  return request<boolean>({
    url: '/customer_service_config/update',
    method: 'post',
    data
  });
}
